<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>WIKINDX CLASS DOCUMENTATION</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/wikindx2/docs/docs.css" type="text/css" />
</head>

<body bgcolor="#FFFFFF" text="#000000">
<h2>WIKINDX METHODS</h2>
<p><strong>Method:</strong><br />
  
  grabAll()
</p>
<p><strong>Class:</strong><br />

  <a href="collectionClass.html">COLLECTION</a>
<p><strong>Method Call:</strong><br />
  include_once("core/collection/COLLECTION.php");<br />
$collection = new COLLECTION($this-&gt;db);<br />
ASSOC. ARRAY $collection->grabAll([STRING: $collectionType = FALSE, INT: $userBibliographyId = FALSE]); </p>
<p><strong>Description:</strong><br />
  Returns an associative array of all the collections in the WIKINDX database  suitable for use with a HTML form select box. If <em>$collectionType</em> is supplied, the list of collections is limited to collections of a particular type (see <em>core/collection/COLLECTIONMAP.php</em>). If <em>$userBibliographyId</em> is supplied, the list of collections is limited to collections from resources within that user bibliography. If both limitations are supplied, both will be applied.

<p><strong>Usage:</strong>
<pre>
	include_once("core/collection/COLLECTION.php");
	$collection = new COLLECTION($this->db);
	$collectionArray = $collection->grabAll('music');
	$collectionArray will be something like:

	array(
			'39'		=>		'Beautiful Maladies: The Island Years',
			'74'		=>		'Chopin Pr&eacute;ludes Op. 28',
			'11'		=>		'Mozart Complete Piano Sonatas',
		);
</pre>
The keys of the arrays are the ID numbers in the database table <em>WKX_collection</em> and are the IDs that are inserted in the <em>collection</em> field in <em>WKX_resource_misc</em>. 
<p align="right"><a href="../../index.html">WIKINDX home</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="../../usage/index.html">WIKINDX usage</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="../index.html">WIKINDX classes</a>
</p>
</body>

</html>
